<?php
header('content-type:text/html;charset=utf-8');
function dbCon() {
	$db_host = "localhost";
	$db_user = "root";
	$db_pass = "root";
	$link = mysqli_connect($db_host, $db_user, $db_pass);
	if ($link) {
		echo "连接数据库成功";
//		return $link;	
	}
	else {
		die('无法连接数据库' . mysqli_error($link));
	}
}
dbCon();
?>